Optimal. Leaf size=77 \[ \frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a-b) \tan ^3(c+d x)}{3 d}+x (a-b)^3+\frac {b^3 \tan ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3661, 390, 203} \[ \frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a-b) \tan ^3(c+d x)}{3 d}+x (a-b)^3+\frac {b^3 \tan ^5(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 390
Rule 3661
Rubi steps
\begin {align*} \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^3}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (b \left (3 a^2-3 a b+b^2\right )+(3 a-b) b^2 x^2+b^3 x^4+\frac {(a-b)^3}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {(3 a-b) b^2 \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d}+\frac {(a-b)^3 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=(a-b)^3 x+\frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {(3 a-b) b^2 \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.93, size = 102, normalized size = 1.32 \[ \frac {\tan (c+d x) \left (b \left (45 a^2-15 a b \left (3-\tan ^2(c+d x)\right )+b^2 \left (3 \tan ^4(c+d x)-5 \tan ^2(c+d x)+15\right )\right )+\frac {15 (a-b)^3 \tanh ^{-1}\left (\sqrt {-\tan ^2(c+d x)}\right )}{\sqrt {-\tan ^2(c+d x)}}\right )}{15 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 90, normalized size = 1.17 \[ \frac {3 \, b^{3} \tan \left (d x + c\right )^{5} + 5 \, {\left (3 \, a b^{2} - b^{3}\right )} \tan \left (d x + c\right )^{3} + 15 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x + 15 \, {\left (3 \, a^{2} b - 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 5.62, size = 1027, normalized size = 13.34 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.03, size = 154, normalized size = 2.00 \[ \frac {b^{3} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}+\frac {a \,b^{2} \left (\tan ^{3}\left (d x +c \right )\right )}{d}-\frac {b^{3} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}+\frac {3 a^{2} b \tan \left (d x +c \right )}{d}-\frac {3 a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {b^{3} \tan \left (d x +c \right )}{d}+\frac {\arctan \left (\tan \left (d x +c \right )\right ) a^{3}}{d}-\frac {3 \arctan \left (\tan \left (d x +c \right )\right ) a^{2} b}{d}+\frac {3 \arctan \left (\tan \left (d x +c \right )\right ) a \,b^{2}}{d}-\frac {\arctan \left (\tan \left (d x +c \right )\right ) b^{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.91, size = 104, normalized size = 1.35 \[ a^{3} x - \frac {3 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} b}{d} + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a b^{2}}{d} + \frac {{\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} b^{3}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.47, size = 115, normalized size = 1.49 \[ \frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5\,d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a^2\,b-3\,a\,b^2+b^3\right )}{d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a-b\right )}^3}{a^3-3\,a^2\,b+3\,a\,b^2-b^3}\right )\,{\left (a-b\right )}^3}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a\,b^2-\frac {b^3}{3}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.67, size = 126, normalized size = 1.64 \[ \begin {cases} a^{3} x - 3 a^{2} b x + \frac {3 a^{2} b \tan {\left (c + d x \right )}}{d} + 3 a b^{2} x + \frac {a b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a b^{2} \tan {\left (c + d x \right )}}{d} - b^{3} x + \frac {b^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} - \frac {b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} + \frac {b^{3} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{2}{\relax (c )}\right )^{3} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________